package common

type OpResult struct {
	State     bool
	Message   string
	StateCode int
}

func (p *OpResult) SetSuccess(msg string) *OpResult {

	p.Message = msg
	p.State = true
	p.StateCode = 1

	return p
}

func (p *OpResult) SetError(msg string) *OpResult {

	p.Message = msg
	p.State = false
	p.StateCode = 0

	return p
}
